<head><meta http-equiv="refresh" content="3; url=http://localhost/hotel/admin/register/order.html">

<?php   header('Content-type: text/html; charset=utf-8');
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "root";
$mysql_database = "db_shop";

$name = $_POST['name'];$gender = $_POST['sex'];$document_type=$_POST['type'];$document_id=$_POST['docu_id'];$order_time=$_POST['ordertime'];$check_num=$_POST['num'];$check_time=$_POST['time'];$room_id=$_POST['roomnum'];$room_type=$_POST['room'];$telphone=$_POST['telphone'];$operator_id = $_POST['operator'];$order_id = $_POST['order'];

$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
$sql = "INSERT INTO `hotel`.`order_info` (`name`,`gender`, `document_type`,`document_id`, `order_time`,`check_num`,  `check_time`, `room_id`, `room_type`, `telphone`,`operator_id`,order_id) VALUES ('$name','$gender','$document_type', '$document_id', '$order_time', '$check_num', '$check_time','$room_id', '$room_type', '$telphone','$operator_id','$order_id')";
   mysql_query ("set names 'utf8'");
    mysql_select_db($mysql_database);
   $result=mysql_query($sql);
   if($result == "")
   echo "出现错误,添加失败";
    else
	{
    echo '添加信息成功';
    }
?>

<body>
</body>
</html>
